(#1)
c0rrupt Offline
Administrator
 
Posts: 185
Join Date: Mar 2010
Location: Canada
Button and Link [Module] - 10-24-2010, 05:21 PM

Button and Link [Module] by jomasaco

1.)
Open wcfg.php

Find:
Code:
$this->sitepath =
After add (and change to your info) this:
Code:
$this->sitename = "YOUR SITE NAME"; //The site Name
$this->site_button = "http://YOUR BUTTON IMAGE.URL"; //The site Button Url
2.)
Create an new txt file and rename to wcddl_butoncode.php
Inside paste the following:
Code:
<?php
/*BEGIN_INFO
This module will show the Link Back codes, www.stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
   exit;
$modEnabled = true; //Change to false if don't use
    if($modEnabled) {
$code = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" target="_blank" title="'.$core->sitename.'"><img src="'.$core->site_button.'" alt="'.$core->sitename.'" width="88" height="31" border="0"></a><!--End '.$core->sitename.'-->';
$code_txt = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" title="'.$core->sitename.'" target="_blank">'.$core->sitename.'</a><!--End '.$core->sitename.'-->';
$codehtml = '<table width="100%" border="0">
   <tr><td colspan="2">We require the use of the button on pages if other DDL buttons are present else you are free to use only the text link.</td></tr>
   <tr><td>Your button:</td><td>'.$code.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="4" cols="50">'.$code.'</textarea></td></tr>
   <tr><td>Your Text Link:</td><td>'.$code_txt.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="3" cols="50">'.$code_txt.'</textarea></td></tr></table>';
$core->setTemplateVar("butoncode",$codehtml);
}
?>
Save and upload to your modules folder.

Add the following to where you want it to show:
Code:
<?=$core->templateVar("butoncode")?>
Example:


Before doing any edits to your DDL Site always make a BACKUP first.
(#2)
Mr. Chinn Offline
WVDDL VIP
 
Posts: 7
Join Date: Jul 2012
07-05-2012, 02:50 AM

Code:
<?php
/*BEGIN_INFO
This module will show the Link Back codes, www.stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
   exit;
$modEnabled = true; //Change to false if don't use
    if($modEnabled) {
$code = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" target="_blank" title="'.$core->sitename.'"><img src="'.$core->site_button.'" alt="'.$core->sitename.'" width="88" height="31" border="0"></a><!--End '.$core->sitename.'-->';
$code_txt = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" title="'.$core->sitename.'" target="_blank">'.$core->sitename.'</a><!--End '.$core->sitename.'-->';
$codehtml = '<table width="100%" border="0">
   <tr><td colspan="2">We require the use of the button on pages if other DDL buttons are present else you are free to use only the text link.</td></tr>
   <tr><td>Your button:</td><td>'.$code.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="4" cols="50">'.$code.'</textarea></td></tr>
   <tr><td>Your Text Link:</td><td>'.$code_txt.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="3" cols="50">'.$code_txt.'</textarea></td></tr></table>';
$core->setTemplateVar("butoncode",$codehtml);
}
?>
Above is the code that worked for me. I don't remember who gave me the code.
(#3)
c0rrupt Offline
Administrator
 
Posts: 185
Join Date: Mar 2010
Location: Canada
07-05-2012, 02:55 AM

Thanks Mr. Chinn. First post updated with your code


Before doing any edits to your DDL Site always make a BACKUP first.

Bookmarks

Tags
button, link, module

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin


Content Relevant URLs by vBSEO